package com.shujia

object Code42ImplicitVariable {
  def main(args: Array[String]): Unit = {

    implicit val variable1 = "隐式转换"
//    implicit val variable2 = "隐式转换"
//    implicit val variable = 10

//    fun(variable1)
    fun
    new Variable().variableFun

  }

  def fun(implicit variable: String): Unit = {
    println("接受到一个变量值：" + variable)
  }

  class Variable(){
    def variableFun(implicit variable: String): Unit = {
      println("接受到一个变量值：" + variable)
    }
  }

}
